<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<html>
<head>
<title>AA拼车</title>
<meta name="decorator" content="default" />
<script type="text/javascript">
	$(document).ready(function() {
		if("${message}".length>0){
			alert("${message}");
		}
	});
	function page(n, s) {
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
		return false;
	}
</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/orders/shareProduct/allShareList">有效拼车</a></li>
		<li ><a href="${ctx}/orders/shareProduct/expireShareList">未成功拼车</a></li>
		<li ><a href="${ctx}/orders/shareProduct/addShareProduct">添加</a></li>
	</ul>
	<form:form id="searchForm" action="${ctx}/orders/shareProduct/allShareList"
		modelAttribute="shareRentproduct" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
		<input id="pageSize" name="pageSize" type="hidden"
			value="${page.pageSize}" />
		<div class="control-group">
			<label class="control-label">产品类型：</label>
			<select class="input-mini" name="sharetype">
				<option value="">全部拼车</option>
				<option value="1">旅游拼车</option>
				<option value="2">接送机拼车</option>
			</select>
			<label class="control-label">产品id：</label>
			<form:input path="sid" htmlEscape="false" maxlength="50"
				class="input-small" />
			<label class="control-label">产品名：</label>
			<form:input path="productname" htmlEscape="false" maxlength="50"
				class="input-small" />
			<input class="btn btn-primary" type="submit" value="查询" />
		</div>
	</form:form>
	<sys:message content="${message}" />
	<table class="table table-striped table-bordered table-condensed">
		<thead>
			<tr class="success">
				<th>产品id</th>
				<th>拼车产品</th>
				<th>创建日期</th>
				<th>发车时间</th>
				<th>截止日期</th>
				<th>成团人数</th>
				<th>已售出</th>
				<th>拼车单价</th>
				<th>产品状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.list}" var="sr">
				<tr>
					<td>${sr.sid }</td>
					<td>${sr.productname }</td>
					<td><fmt:formatDate value="${sr.createDate }" pattern="yyyy-MM-dd HH:mm" /></td>
					<td><fmt:formatDate value="${sr.fromdate  }"  pattern="yyyy-MM-dd HH:mm" /></td>
					<td><fmt:formatDate value="${sr.enddate  }"  pattern="yyyy-MM-dd HH:mm" /></td>
					<td>${sr.minamount }</td>
					<td>${sr.currentsell }</td>
					<td>${sr.avgprice }</td>
					<td><c:if test="${sr.status=='1' }">正在拼车</c:if>
						<c:if test="${sr.status=='2' }">拼车截止</c:if>
					</td>
					<td><a href="${ctx}/orders/shareProduct/shareForm?sid=${sr.sid}">查看</a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>